<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Diagram code</title>
        <style>
            blockquote {
                font-size: 11px;
                margin: 5px;
                padding: 0px;
            }
            
            textarea {
                border: 1px dotted gray; 
                padding: 3px; 
                margin: 2; 
                font-family: times; 
                font-size: 10px; 
                width: 100%; 
                height: 150px;
            }
        </style>                                                                   
    </head>

    <body>
        <blockquote>
            Embed this diagram in your own web page: 
            Copy the following html code into your page where you want to place the diagram, or use the URL on its own. 
            The diagram will be generated live from the database using the current search criteria whenever the diagram is loaded.
        </blockquote>

        <textarea readonly="" id="code-textbox" onclick="select(); if (window.clipboardData) clipboardData.setData('Text', value);">
            Code
        </textarea>
        
        <blockquote>
            Note: records will only appear on the diagram if they have public status.
        </blockquote>
        
        <script>
            // Show in textbox
            var url = window.parent.getCustomURL();
            var box = document.getElementById("code-textbox");
            box.innerHTML = "<iframe src='"+url+"'></iframe>";
        </script>
    </body>
</html>
